﻿using SanJ.FreeCare.ValueSets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;

namespace SanJ.FreeCare.ObservationDefinitionItems
{
    /// <summary>
    /// 观测定义规则
    /// </summary>
    public class ObservationDefinitionItem : AuditedAggregateRoot<Guid>, ISoftDelete
    {
        /// <summary>
        /// 观测项目ID
        /// </summary>
        public Guid ObservationDefinitionId { get; set; }

        /// <summary>
        /// 使用的上下文
        /// </summary>
        public string? Context { get; set; }
        /// <summary>
        /// 规则类型 age年龄，gestational妊娠时间
        /// </summary>
        public string? Type { get; set; }
        /// <summary>
        /// 项目状态 是否有效
        /// </summary>
        public string IsVaild { get; set; }
        /// <summary>
        /// 规则详细描述
        /// </summary>
        public string? Description { get; set; }
        /// <summary>
        /// 数值类型最大值
        /// </summary>
        public double? RangMax { get; set; }
        /// <summary>
        /// 数值类型最小值
        /// </summary>
        public double? RangMin { get; set; }
        /// <summary>
        /// 此观测项目对其他有影响的观测项目，
        /// </summary>
        public string? VaildCodes { get; set; }
        /// <summary>
        /// 此观测项目对其他没有影响的观测项目，
        /// </summary>
        public string? InVaildCodes { get; set; }
        /// <summary>
        /// 此观测项目对其他有影响的项目
        /// </summary>
        public string? EffectTargets { get; set; }
        /// <summary>
        /// 常用取值，值类型，序列化在数据库里了
        /// </summary>
        //public List<CodeConcept> NormalConcepts { get; set; }
        public string? NormalConcepts { get; set; }

        public bool IsDeleted { get; set; }

        public ObservationDefinitionItem() { }
    }
}
